import request from '@/utils/request'

// 查询维保报告列表
export function listReport(query) {
  return request({
    url: '/org/report/list',
    method: 'get',
    params: query
  })
}

// 审核报告
export function reportReview(data) {
  return request({
    url: `/org/report/review`,
    method: 'post',
    data,
  })
}

// 查询维保报告详细
export function getReport(id) {
  return request({
    url: '/system/report/' + id,
    method: 'get'
  })
}

// 新增维保报告
export function addReport(data) {
  return request({
    url: '/system/report',
    method: 'post',
    data: data
  })
}

// 修改维保报告
export function updateReport(data) {
  return request({
    url: '/system/report',
    method: 'put',
    data: data
  })
}

// 删除维保报告
export function delReport(id) {
  return request({
    url: '/system/report/' + id,
    method: 'delete'
  })
}


// 查询维保报告详细列表
export function getOrgReport(id) {
  return request({
    url: '/org/report/' + id,
    method: 'get'
  })
}

// 查询维保报告详细列表(app)
export function getOrgAppReport(id) {
  return request({
    url: `/org/app/report/${id}`,
    method: 'get'
  })
}



// 修改维保报告
export function updateOrgReport(data) {
  return request({
    url: `/org/report/updateReport`,
    method: 'put',
    data
  })
}

// 查询维保报告列表
export function reportCount(query) {
  return request({
    url: '/org/report/list2',
    method: 'get',
    params: query
  })
}